﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VTR.Core
{
    public static class ExtensionMethods
    {
        public static string ToPhoneNumber(this string inputPhone)
        {
            try
            {
                return inputPhone.Length == 10 ? string.Format("({0}){1}-{2}", inputPhone.Substring(0, 3), inputPhone.Substring(3, 3), inputPhone.Substring(6, 4)) : string.Empty;
            }
            catch
            {
                return string.Empty;
            }
        }
    }
}
